{% extends 'layout.html' %}
{% load mytags %}
{% block content %}
    <form action="" method="post">
        {% csrf_token %}
        {{ obj.management_form }}
        <div>
            <button class="btn btn-primary btn-sm">保存</button>
        </div>
        <table class="table-hover table-bordered table">
            <thead>
            <tr>
                <th>序号</th>
                <th>学生姓名</th>
                <th>考勤</th>
                <th>成绩</th>
                <th>批语</th>
            </tr>
            </thead>
            <tbody>
            {% for field in obj %}
                <tr>
                    {{ field.id }}
                    <td>{{ forloop.counter }}</td>
                    <td>{{ field.instance.student }}</td>
                    <td>{{ field.attendance }}</td>
                    <td>{{ field.score }}</td>
                    <td>{{ field.homework_note }}</td>
                    <td class="hidden">{{ field.course_record }}</td>
                    <td class="hidden">{{ field.student }}</td>
                </tr>
            {% endfor %}

            </tbody>
        </table>
    </form>
    <nav aria-label="Page navigation">
        <ul class="pagination">
            {{ page_html }}
        </ul>
    </nav>
{% endblock %}